#ifndef _SPWM_H_
#define _SPWM_H_
#include "main.h"
#define MAX_COUNT 1280.f
#define _PI 3.131592f
#define _PI_3_2 2*_PI/3.f
typedef struct{

	float Omega;
	float Umax;
	float HZ;
	float UA;
	float UB;
	float UC;

}three_phrase_infor_t;

typedef struct{
	float avergae_ua;
	float avergae_ub;
	float avergae_uc;
}avergae_power_t;

HAL_StatusTypeDef resset_device(void);
HAL_StatusTypeDef spwm_function(TIM_HandleTypeDef *htim_s,float u_max,TIM_HandleTypeDef *htim_c,avergae_power_t *avp);

#endif 

